package com.lagou.controller;

import com.lagou.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: EmailController
 * @Auther: Jerry
 * @Date: 2020/10/22 16:29
 * @Desctiption: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/email/{email}/{code}")
    public Boolean sendToEmail(@PathVariable("email") String email,
                               @PathVariable("code") String code) {
        return emailService.sendToEmail(email, code);
    }

}
